import request from '@/utils/request'
// 新增部门
export function addData(data) {
  return request({
    url: '/company/department',
    method: 'post',
    data
  })
}

// 查询
export function getData() {
  return request({
    url: '/company/department',
    method: 'get'

  })
}

// 修改
export function putData(data) {
  return request({
    url: `/company/department/${data.id}`,
    method: 'put',
    data
  })
}

// 删除
export function delData(id) {
  return request({
    url: `/company/department/${id}`,
    method: 'DELETE'
  })
}

// 根据id查询

export function getIdData(id) {
  return request({
    url: `/company/department/${id}`,
    method: 'get'
  })
}

